<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/**
 *  Lang Model Class  
 *  
 * @package XGO CMS v2.0 
 * @subpackage News  
 * @author Manh Nguyen - 03/08/2012 
 * @link http://sunsoft.vn
 */
class Language_model extends DataMapper {

    var $model = 'language_model';
    var $table = 'language';

    // --------------------------------------------------------------------
    // Construct
    // --------------------------------------------------------------------
    public function __construct() {
        parent::__construct();
        $this->active = 1;
    }
    
    /**
     * get lang list
     * @return list(Language)
     */
    function get_list() {
        $lang_list = array();
        foreach ($this->select('id,title')->get() as $item) {
            $lang_list[$item->id] = $item->title;
        }
        return $lang_list;
    }

}

/* End of file lang_model.php */
/* Location: ./application/models/lang_model.php */